<!--中间主界面组件-->
<template>
  <div class="home">
    <el-container class="el-container">
      <!--侧边栏-->
      <el-aside class="el-aside" v-if="
        this.$store.state.user !== null &&
        this.$store.state.role !== null &&
        this.$store.state.role.indexOf(this.$VAR.ordinaryRole) === -1
      ">
        <Aside></Aside>
      </el-aside>
      <!--导航栏-->
      <el-container class="el-container">
        <el-header class="el-header">
          <Header></Header>
        </el-header>
        <!--主面板-->
        <el-main class="el-main">
          <router-view></router-view>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
import Aside from "./Aside";
import Header from "./Header";
import ProductList from "../product/ProductList";
import ProductAdd from "../product/ProductAdd";
export default {
  name: "Home",
  components: { Aside, Header, ProductList, ProductAdd },
};
</script>

<style>
.home {
  height: 100%;
  /* 隐藏滚动条*/
  scrollbar-width: none; 
  -ms-overflow-style: none;
}

.home .el-container {
  height: 100%;
  width: 100%;
  background-color: #f5f5f5;
}

.home .el-header {
  padding: 0;
  background-color: #fff;
  border-bottom: 1px solid rgb(229, 231, 235);
  color: #333;
  text-align: center;
}

.home .el-footer {
  padding: 0;
  color: #333;
  height: 50px !important;
  background: #ffffff;
  line-height: 50px;
}

.home .el-aside {
  width: 180px !important;
  background-color: #d3dce6;
  color: #333;
  text-align: center;
  line-height: 200px;
}

.home .el-main {
  padding: 0;
  color: #333;
  text-align: center;
  /*隐藏滚动条*/
  scrollbar-width: none;
  /* 针对 Firefox 浏览器 */
  -ms-overflow-style: none;
  /* 针对 IE 和 Edge 浏览器 */
}

.home .footer {
  width: 100%;
  height: 100%;
  line-height: 50px;
  font-size: 10px;
  user-select: none;
}
</style>
